package com.dlc.beijingrfid.model;

import android.support.annotation.IntDef;
import com.dlc.beijingrfid.base.Constants;
import com.dlc.beijingrfid.model.intfc.ProductAbnormal;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

/**
 * Created by John on 2017/7/21.
 */

public class ProductAbnormalHead implements ProductAbnormal {

    private int type;

    @IntDef({
        Constants.PRODUCT_TYPE.TOWEL, Constants.PRODUCT_TYPE.SHEET, Constants.PRODUCT_TYPE.BEDDING,
    })
    @Retention(RetentionPolicy.SOURCE)
    @interface Type {
    }

    public ProductAbnormalHead(@Type int type) {
        this.type = type;
    }

    @Override
    public int getLevel() {
        return LEVEL_0;
    }

    @Type
    public int getType() {
        return type;
    }

    public void setType(@Type int type) {
        this.type = type;
    }
}
